"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var PromiseCounter = function () {
  function PromiseCounter() {
    _classCallCheck(this, PromiseCounter);
  }

  PromiseCounter.countUp = function countUp() {
    PromiseCounter.count = Math.max(PromiseCounter.count + 1, 0);
  };

  PromiseCounter.countDown = function countDown() {
    PromiseCounter.count = Math.max(PromiseCounter.count - 1, 0);
  };

  PromiseCounter.reset = function reset() {
    PromiseCounter.count = 0;
  };

  PromiseCounter.isEmpty = function isEmpty() {
    return PromiseCounter.count === 0;
  };

  return PromiseCounter;
}();

PromiseCounter.count = 0;
exports.default = PromiseCounter;